﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Campus.Main.Basic.InsertValues
{
    public partial class Valute : Default
    {
        public Valute()
        {
            InitializeComponent();
        }
        public Valute(List<string> aList):base(aList)
        {
            InitializeComponent();
            id = aList[0];
            textBox1.Text = aList[1];
            button2.Click += button2_Click;
        }

        protected override void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text.Length > 0)
            {
                aToDb.UpdateTable("valute", "description", textBox1.Text, id);
                Close();
            }
            else
            {
                MessageBox.Show("Талааны толтургула!!!");
            }
        }
    }
}
